From: Jonathan Wright Date: Wed, 14 Mar 2018 17:55:32 +0000 (+0000) Subject: plat/common: remove fall-through on release build X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=8ae0df93a01bfd869fa80068b5df17359d798714;p=project%2Fbcm63xx%2Fatf.git plat/common: remove fall-through on release build Removes fall-through in switch statement on unknown interrupt type in release builds. Previous behaviour was to assert(0) on default case in debug builds but fall through and interpret the unknown interrupt type as INTR_TYPE_EL3 in release builds. Change-Id: I05fb0299608efda0f9eda2288d3e56e5625e05c9 Signed-off-by: Jonathan Wright --- diff --git a/plat/common/plat_gicv3.c b/plat/common/plat_gicv3.c index 030eea72..cf9aca22 100644 --- a/plat/common/plat_gicv3.c +++ b/plat/common/plat_gicv3.c @@ -158,15 +158,14 @@ uint32_t plat_interrupt_type_to_line(uint32_t type, return __builtin_ctz(SCR_FIQ_BIT); else return __builtin_ctz(SCR_IRQ_BIT); - default: - assert(0); - /* Fall through in the release build */ case INTR_TYPE_EL3: /* * The EL3 interrupts are signaled as FIQ in both S-EL0/1 and * NS-EL0/1/2 contexts */ return __builtin_ctz(SCR_FIQ_BIT); + default: + panic(); } }